{extend name='template/base'}{/extend}
{block name='style'}{/block}
{block name='script'}{/block}
{block name='content'}
<div class="wrapper">
    <form class="form-horizontal" id="form" action="{:url('AccountWithdrawOrder/verify')}">
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-3 control-label">提现用户</label>
                <div class="col-sm-6">
                    <input class="form-control" type="text" value="{$item.name}" readonly>
                    <input  type="hidden" value="{$item.id}">
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">提现金额</label>
                <div class="col-sm-6">
                    <input class="form-control" type="text" readonly value="{$item.apply_money}">
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">申请时间</label>
                <div class="col-sm-6">
                    <input class="form-control" type="text" value="{$item.create_time}"  readonly>
                </div>
                <div class="col-sm-3"></div>
            </div>
            <div class="form-group">
                <div class="col-sm-9 col-sm-offset-3">
                    <button type="button" class="btn btn-primary btn-submit">&nbsp;&nbsp;放款&nbsp;&nbsp;</button>
                    <button type="button" class="btn btn-default radius ml-20" onclick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                </div>
            </div>
        </div>
    </form>
</div>
{/block}
{block name='script_extra'}

<script>
    var id="{$item.id}";
    $('.btn-submit').on('click',function () {
        $.ajax({
            dataType:'json',
            data:{id:id},
            url:"{:url('AccountWithdrawOrder/verify_submit')}",
            success:function (res) {
                if(res.success){
                    layer.msg(res.message, {time: 1000},function () {
                        layer_close();
                        parent.$('#table').bootstrapTable('refresh');
                    });
                }else{
                    layer.alert(res.message);
                }
            }
        })
    })
</script>
{/block}